//
//  SelectedPersonView.h
//  Marketing
//
//  Created by User on 16/5/26.
//  Copyright © 2016年 Hanen 3G 01. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DepartmentModel.h"
#import "UserModel.h"
#import "HeaderView.h"
#import "ChooseDepartCell.h"
#import "HeaderView2.h"

static NSString * const ReuseIdentifierHeader = @"header";


@protocol SelectStaffViewDelegate <NSObject>

- (void)getSelectedStaff:(NSArray *)array;

@end

typedef void(^chooseBlock)(BOOL isChoose);

@interface SelectedPersonView : UIView<UITableViewDelegate,UITableViewDataSource,UISearchBarDelegate,HeaderViewDelegate,HeaderView2Delegate>

@property (nonatomic) BOOL isSearching;
@property (nonatomic, copy) chooseBlock  block;
@property (strong, nonatomic) NSMutableArray *searchArray;
@property (strong, nonatomic) NSMutableArray *searchArray2;

@property (strong, nonatomic) NSMutableArray *selectedArray;

@property (strong, nonatomic) UISearchBar * searchBar;
@property (strong, nonatomic) UISearchBar * searchBar2;
@property (strong, nonatomic) UITableView * tableView;
@property (strong, nonatomic) UITableView * staffTableView;

@property (strong, nonatomic) UIButton * selectBtn;

@property(nonatomic,strong)id<SelectStaffViewDelegate>delegate;

@property (strong, nonatomic) DepartmentModel *model;
@property (strong, nonatomic) NSMutableArray *departs;

@property (strong, nonatomic) NSMutableArray *selectedDeparts;

@property (strong, nonatomic) UserModel *userModel;
@property (strong, nonatomic) NSMutableArray *users;

@property (strong, nonatomic) NSMutableArray *selectedUsers;

@property (nonatomic) BOOL isAll;

@property (strong, nonatomic) NSMutableArray *allUsers;
@property (nonatomic) BOOL isAllSelected;

@property (nonatomic, assign) BOOL isCreatDepartment;

@property (nonatomic, strong) id addTarget;

@property (nonatomic,strong) UIView *alphaView;

@end
